Users friendSelector Class
Allows selecting a facebook friend from the logged-in user's friends list.
Constructor
Users friendSelector
-
[options]
Parameters:
-
[options]
Object optionalthis object contains function parameters
-
[onSelect]
Function optionalThis callback is called when the user selects a friend.
-
[customList]
Array | Object | Function optionalOptional. By default friends list is fetched from facebook, but here you can provide an array of friends or callback which in turn will call friendSelector callback passing it such array as first agrument. Callback may be a function or string name of the function. Array should contain objects like
{ id: 'id', name: 'name' }
. 'includeMe' option is ignored if 'customList' provided -
[includeMe]
String | Boolean optionalWhether or not to include user himself. Can be just boolean true or a string, which is used instead of user real name. Ignored if 'customList' option is provided.
-
[platform]
String optionalHas to be "facebook" for now.
-
[prompt]
String | Boolean optionalSpecifies type of prompt if user is not logged in or didn't give required permission for the tool. Can be either 'button', 'dialog' or null|false. In first case just shows simple button which opens facebook login popup. In second case shows Users.facebookDialog prompting user to login. In third case will not show any prompt and will just hide the tool.
-
[promptTitle]
String optionalUsed only when 'prompt' equals 'dialog' - will be title of the dialog.
-
[promptText]
String optionalUsed either for button caption when 'prompt' equals 'button' or dialog text when 'prompt' equals 'dialog'.
-
[filter]
Function optionalCustom function to filter out the friends list.
-
[ordering]
Function optionalCustom function to order the friends list. By default friends are ordered by name.
-